<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Haxe Tests (JS)</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>
    <body id="haxe:trace">
        <script type="text/javascript" src="//code.jquery.com/jquery-1.12.4.min.js"></script>
        <script type="text/javascript">
            // http://stackoverflow.com/questions/11582512/how-to-get-url-parameters-with-javascript
            function getURLParameter(name) {
                return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
            }
            $.ajax({
                url: getURLParameter("js") || "bin/unit.js",
                dataType: "script",
                success: function() {
                    unit.TestMain.main();
                },
                error: function(jqXHR, textStatus, errorThrown) {
                    throw errorThrown;
                }
            });
        </script>
    </body>
</html>